const express = require('express')
const router = express.Router()
const verify = require("../util/jwt");
const videoValidator = require('../middleware/validator/videoValidator')
const videoController = require('../controller/videoController')
router
.post('/createVideos',verify.verifyToken(),videoValidator.createVideos,videoController.createVideos)
.get('/videoLists',verify.verifyToken(false),videoController.videoLists)
.get('/video/:videoId',verify.verifyToken(),videoController.video)//获取某条视频详情
.get('/getHotVideo/:num',verify.verifyToken(),videoController.getHotVideo)//获取某几条热门推荐视频
.post('/comment/:videoId',verify.verifyToken(),videoController.comment) // 评论 新增评论Model模型
.get('/commentLists/:videoId',verify.verifyToken(),videoController.commentLists) // 评论 新增评论列表
.delete('/comment/:videoId/:commentId',verify.verifyToken(),videoController.deletecomment) // 评论 新增评论删除
.get('/likevideo/:videoId/',verify.verifyToken(),videoController.likevideo) //喜欢 新增videolike模型
.get('/collect/:videoId/',verify.verifyToken(),videoController.collectvideo) //收藏视频
.get('/dislikevideo/:videoId/',verify.verifyToken(),videoController.dislikevideo) // 不喜欢 新增videolike模型
.get('/likelists', verify.verifyToken(), videoController.likelist)


module.exports = router